﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;

namespace 多环境读取JSON文件.Controllers
{
    
    public class EnvironmentController : Controller
    {
        private readonly IConfiguration _configuration;

        public EnvironmentController(IConfiguration configuration)
        {
            _configuration = configuration;
        }

        // /Environment/Index
        
        public IActionResult Index()
        {
            var environmentName = _configuration["Enviroment"];

            return View(nameof(Index), environmentName);
        }
    }
}